projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f50adf1
)
(set-visited-file-name): Query if there's already another
author
Richard M. Stallman
<rms@gnu.org>
Fri, 1 Mar 1996 20:29:32 +0000
(20:29 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Fri, 1 Mar 1996 20:29:32 +0000
(20:29 +0000)
buffer visiting this file.
lisp/files.el
patch
|
blob
|
history
diff --git
a/lisp/files.el
b/lisp/files.el
index 309410ba9923f080f8c1c4633ef75ab14d72ef67..b06e5a62f3851e00fcc41b3bc6a7a10648327923 100644
(file)
--- a/
lisp/files.el
+++ b/
lisp/files.el
@@
-1422,6
+1422,11
@@
if you wish to pass an empty string as the argument."
(setq truename (file-truename filename))
(if find-file-visit-truename
(setq filename truename))))
+ (let ((buffer (find-buffer-visiting filename)))
+ (and buffer (not (eq buffer (current-buffer)))
+ (not (y-or-n-p (message "A buffer is visiting %s; proceed? "
+ filename)))
+ (error "Aborted")))
(or (equal filename buffer-file-name)
(progn
(and filename (lock-buffer filename))